package com.tong.ft_login.service;

import android.content.Context;
import android.util.Log;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.tong.ft_login.LoginActivity;
import com.tong.ft_login.utils.CalculateUtils;
import com.tong.lib_base.ft_login.model.UserBean;
import com.tong.lib_base.ft_login.service.LoginService;

/**
 * @author:liuzhitong
 * date:2022/2/18
 * description:登录模块实现类
 *
 * @Route 添加路由注解，目的：解耦。其他模块不用引入login模块也可以调用LoginServiceIml。
 */
@Route(path = "/login/login_service")
public class LoginServiceIml implements LoginService {
    @Override
    public UserBean getUserInfo() {
        return new UserBean("15098776295","xixi688","88888888");
    }

    @Override
    public void removeUser() {

    }

    @Override
    public boolean hasLogin() {
        return false;
    }

    @Override
    public void login(Context context,String param) {
        LoginActivity.start(context,param);
    }

    @Override
    public int calculate(int a, int b) {
        return CalculateUtils.calculate(a,b);
    }

    @Override
    public void init(Context context) {
        Log.e("登录模块","初始化LoginServiceIml类");
    }
}
